Optimal. Leaf size=93 \[ -\frac {a+b \tanh ^{-1}(c x)}{e (d+e x)}-\frac {b c \log (1-c x)}{2 e (c d+e)}+\frac {b c \log (1+c x)}{2 (c d-e) e}-\frac {b c \log (d+e x)}{c^2 d^2-e^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 93, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {6063, 720, 31,
647} \begin {gather*} -\frac {a+b \tanh ^{-1}(c x)}{e (d+e x)}-\frac {b c \log (d+e x)}{c^2 d^2-e^2}-\frac {b c \log (1-c x)}{2 e (c d+e)}+\frac {b c \log (c x+1)}{2 e (c d-e)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 647
Rule 720
Rule 6063
Rubi steps
\begin {align*} \int \frac {a+b \tanh ^{-1}(c x)}{(d+e x)^2} \, dx &=-\frac {a+b \tanh ^{-1}(c x)}{e (d+e x)}+\frac {(b c) \int \frac {1}{(d+e x) \left (1-c^2 x^2\right )} \, dx}{e}\\ &=-\frac {a+b \tanh ^{-1}(c x)}{e (d+e x)}-\frac {(b c) \int \frac {-c^2 d+c^2 e x}{1-c^2 x^2} \, dx}{e \left (c^2 d^2-e^2\right )}-\frac {(b c e) \int \frac {1}{d+e x} \, dx}{c^2 d^2-e^2}\\ &=-\frac {a+b \tanh ^{-1}(c x)}{e (d+e x)}-\frac {b c \log (d+e x)}{c^2 d^2-e^2}-\frac {\left (b c^3\right ) \int \frac {1}{-c-c^2 x} \, dx}{2 (c d-e) e}+\frac {\left (b c^3\right ) \int \frac {1}{c-c^2 x} \, dx}{2 e (c d+e)}\\ &=-\frac {a+b \tanh ^{-1}(c x)}{e (d+e x)}-\frac {b c \log (1-c x)}{2 e (c d+e)}+\frac {b c \log (1+c x)}{2 (c d-e) e}-\frac {b c \log (d+e x)}{c^2 d^2-e^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.10, size = 102, normalized size = 1.10 \begin {gather*} -\frac {a}{e (d+e x)}-\frac {b \tanh ^{-1}(c x)}{e (d+e x)}-\frac {b c \log (1-c x)}{2 e (c d+e)}-\frac {b c \log (1+c x)}{2 e (-c d+e)}-\frac {b c \log (d+e x)}{c^2 d^2-e^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.15, size = 128, normalized size = 1.38
method | result | size |
derivativedivides | \(\frac {-\frac {a \,c^{2}}{\left (c e x +d c \right ) e}-\frac {b \,c^{2} \arctanh \left (c x \right )}{\left (c e x +d c \right ) e}-\frac {b \,c^{2} \ln \left (c x -1\right )}{e \left (2 d c +2 e \right )}+\frac {b \,c^{2} \ln \left (c x +1\right )}{e \left (2 d c -2 e \right )}-\frac {b \,c^{2} \ln \left (c e x +d c \right )}{\left (d c +e \right ) \left (d c -e \right )}}{c}\) | \(128\) |
default | \(\frac {-\frac {a \,c^{2}}{\left (c e x +d c \right ) e}-\frac {b \,c^{2} \arctanh \left (c x \right )}{\left (c e x +d c \right ) e}-\frac {b \,c^{2} \ln \left (c x -1\right )}{e \left (2 d c +2 e \right )}+\frac {b \,c^{2} \ln \left (c x +1\right )}{e \left (2 d c -2 e \right )}-\frac {b \,c^{2} \ln \left (c e x +d c \right )}{\left (d c +e \right ) \left (d c -e \right )}}{c}\) | \(128\) |
risch | \(-\frac {b \ln \left (c x +1\right )}{2 e \left (e x +d \right )}-\frac {\ln \left (c x -1\right ) b \,c^{2} d e x -\ln \left (-c x -1\right ) b \,c^{2} d e x +2 \ln \left (-e x -d \right ) b c \,e^{2} x +\ln \left (c x -1\right ) b \,c^{2} d^{2}-\ln \left (c x -1\right ) b c \,e^{2} x -\ln \left (-c x -1\right ) b \,c^{2} d^{2}-\ln \left (-c x -1\right ) b c \,e^{2} x -b \,c^{2} d^{2} \ln \left (-c x +1\right )+2 \ln \left (-e x -d \right ) b c d e -\ln \left (c x -1\right ) b c d e -\ln \left (-c x -1\right ) b c d e +2 a \,c^{2} d^{2}+b \,e^{2} \ln \left (-c x +1\right )-2 a \,e^{2}}{2 \left (d c -e \right ) \left (d c +e \right ) \left (e x +d \right ) e}\) | \(239\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.34, size = 99, normalized size = 1.06 \begin {gather*} \frac {1}{2} \, {\left (c {\left (\frac {\log \left (c x + 1\right )}{c d e - e^{2}} - \frac {\log \left (c x - 1\right )}{c d e + e^{2}} - \frac {2 \, \log \left (x e + d\right )}{c^{2} d^{2} - e^{2}}\right )} - \frac {2 \, \operatorname {artanh}\left (c x\right )}{x e^{2} + d e}\right )} b - \frac {a}{x e^{2} + d e} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 393 vs.
\(2 (89) = 178\).
time = 0.47, size = 393, normalized size = 4.23 \begin {gather*} -\frac {2 \, a c^{2} d^{2} - 2 \, a \cosh \left (1\right )^{2} - 4 \, a \cosh \left (1\right ) \sinh \left (1\right ) - 2 \, a \sinh \left (1\right )^{2} - {\left (b c^{2} d^{2} + b c x \cosh \left (1\right )^{2} + b c x \sinh \left (1\right )^{2} + {\left (b c^{2} d x + b c d\right )} \cosh \left (1\right ) + {\left (b c^{2} d x + 2 \, b c x \cosh \left (1\right ) + b c d\right )} \sinh \left (1\right )\right )} \log \left (c x + 1\right ) + {\left (b c^{2} d^{2} - b c x \cosh \left (1\right )^{2} - b c x \sinh \left (1\right )^{2} + {\left (b c^{2} d x - b c d\right )} \cosh \left (1\right ) + {\left (b c^{2} d x - 2 \, b c x \cosh \left (1\right ) - b c d\right )} \sinh \left (1\right )\right )} \log \left (c x - 1\right ) + 2 \, {\left (b c x \cosh \left (1\right )^{2} + b c x \sinh \left (1\right )^{2} + b c d \cosh \left (1\right ) + {\left (2 \, b c x \cosh \left (1\right ) + b c d\right )} \sinh \left (1\right )\right )} \log \left (x \cosh \left (1\right ) + x \sinh \left (1\right ) + d\right ) + {\left (b c^{2} d^{2} - b \cosh \left (1\right )^{2} - 2 \, b \cosh \left (1\right ) \sinh \left (1\right ) - b \sinh \left (1\right )^{2}\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{2 \, {\left (c^{2} d^{2} x \cosh \left (1\right )^{2} + c^{2} d^{3} \cosh \left (1\right ) - x \cosh \left (1\right )^{4} - x \sinh \left (1\right )^{4} - d \cosh \left (1\right )^{3} - {\left (4 \, x \cosh \left (1\right ) + d\right )} \sinh \left (1\right )^{3} + {\left (c^{2} d^{2} x - 6 \, x \cosh \left (1\right )^{2} - 3 \, d \cosh \left (1\right )\right )} \sinh \left (1\right )^{2} + {\left (2 \, c^{2} d^{2} x \cosh \left (1\right ) + c^{2} d^{3} - 4 \, x \cosh \left (1\right )^{3} - 3 \, d \cosh \left (1\right )^{2}\right )} \sinh \left (1\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 690 vs.
\(2 (73) = 146\).
time = 1.27, size = 690, normalized size = 7.42 \begin {gather*} \begin {cases} - \frac {2 a d}{2 d^{2} e + 2 d e^{2} x} + \frac {b d \operatorname {atanh}{\left (\frac {e x}{d} \right )}}{2 d^{2} e + 2 d e^{2} x} + \frac {b d}{2 d^{2} e + 2 d e^{2} x} - \frac {b e x \operatorname {atanh}{\left (\frac {e x}{d} \right )}}{2 d^{2} e + 2 d e^{2} x} & \text {for}\: c = - \frac {e}{d} \\- \frac {2 a d}{2 d^{2} e + 2 d e^{2} x} - \frac {b d \operatorname {atanh}{\left (\frac {e x}{d} \right )}}{2 d^{2} e + 2 d e^{2} x} - \frac {b d}{2 d^{2} e + 2 d e^{2} x} + \frac {b e x \operatorname {atanh}{\left (\frac {e x}{d} \right )}}{2 d^{2} e + 2 d e^{2} x} & \text {for}\: c = \frac {e}{d} \\\tilde {\infty } \left (a x + b x \operatorname {atanh}{\left (c x \right )} + \frac {b \log {\left (x - \frac {1}{c} \right )}}{c} + \frac {b \operatorname {atanh}{\left (c x \right )}}{c}\right ) & \text {for}\: d = - e x \\\frac {a x + b x \operatorname {atanh}{\left (c x \right )} + \frac {b \log {\left (x - \frac {1}{c} \right )}}{c} + \frac {b \operatorname {atanh}{\left (c x \right )}}{c}}{d^{2}} & \text {for}\: e = 0 \\- \frac {a}{d e + e^{2} x} & \text {for}\: c = 0 \\- \frac {a c^{2} d^{2}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {a e^{2}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {b c^{2} d e x \operatorname {atanh}{\left (c x \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {b c d e \log {\left (x - \frac {1}{c} \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} - \frac {b c d e \log {\left (\frac {d}{e} + x \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {b c d e \operatorname {atanh}{\left (c x \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {b c e^{2} x \log {\left (x - \frac {1}{c} \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} - \frac {b c e^{2} x \log {\left (\frac {d}{e} + x \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {b c e^{2} x \operatorname {atanh}{\left (c x \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} + \frac {b e^{2} \operatorname {atanh}{\left (c x \right )}}{c^{2} d^{3} e + c^{2} d^{2} e^{2} x - d e^{3} - e^{4} x} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 243 vs.
\(2 (89) = 178\).
time = 0.41, size = 243, normalized size = 2.61 \begin {gather*} -c {\left (\frac {b \log \left (\frac {{\left (c x + 1\right )} c d}{c x - 1} - c d + \frac {{\left (c x + 1\right )} e}{c x - 1} + e\right )}{c^{2} d^{2} - e^{2}} - \frac {b \log \left (-\frac {c x + 1}{c x - 1}\right )}{\frac {{\left (c x + 1\right )} c^{2} d^{2}}{c x - 1} - c^{2} d^{2} + \frac {2 \, {\left (c x + 1\right )} c d e}{c x - 1} + \frac {{\left (c x + 1\right )} e^{2}}{c x - 1} + e^{2}} - \frac {b \log \left (-\frac {c x + 1}{c x - 1}\right )}{c^{2} d^{2} - e^{2}} - \frac {2 \, a}{\frac {{\left (c x + 1\right )} c^{2} d^{2}}{c x - 1} - c^{2} d^{2} + \frac {2 \, {\left (c x + 1\right )} c d e}{c x - 1} + \frac {{\left (c x + 1\right )} e^{2}}{c x - 1} + e^{2}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.60, size = 115, normalized size = 1.24 \begin {gather*} -\frac {d^2\,\left (\frac {b\,c\,\ln \left (c^2\,x^2-1\right )}{2}-b\,c\,\ln \left (d+e\,x\right )+a\,c^2\,x+b\,c^2\,x\,\mathrm {atanh}\left (c\,x\right )\right )+d\,e\,\left (b\,\mathrm {atanh}\left (c\,x\right )-b\,c\,x\,\ln \left (d+e\,x\right )+\frac {b\,c\,x\,\ln \left (c^2\,x^2-1\right )}{2}\right )-a\,e^2\,x}{d\,\left (e^2-c^2\,d^2\right )\,\left (d+e\,x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________